package j04zuoye;

import java.util.List;
import java.util.stream.Collectors;
import java.util.stream.Stream;

/*
3，转换大写
给定一个字符串列表，将其中所有字符串转换为大写并输出。
 列表内容: ["hello", "world", "java", "stream"]
 转换后的列表内容: ["HELLO", "WORLD", "JAVA", "STREAM"]
 */
public class J4daxie {
    public static void main(String[] args) {
//        Stream.of("hello", "world", "java", "stream")
//                .map(el->el.toUpperCase())
//                .forEach(el-> System.out.println(el));
        List<String> l1 = Stream.of("hello", "world", "java", "stream")
                .map(el->el.toUpperCase()).collect(Collectors.toList());
        System.out.println("l1 = " + l1);
    }
}
